//#pragma comment(lib, "glfwdll_d.lib")

#include "windowimplgl.hpp"

#include <gl/glfw.h>

using namespace dexgel;

priv::WindowImplGL::WindowImplGL( int xres, int yres, const std::string& Title )
{
	glfwInit();
	glfwOpenWindow(xres,yres,8,8,8,8,24,24,GLFW_WINDOW);
}

priv::WindowImplGL::WindowImplGL()
{

}

priv::WindowImplGL::~WindowImplGL()
{
	glfwCloseWindow();
	glfwTerminate();
}

void priv::WindowImplGL::Display()
{
	glfwSwapBuffers();
}

bool priv::WindowImplGL::IsOpened()
{
	return ( glfwGetWindowParam(GLFW_OPENED)==1 );
}

Rendrer* priv::WindowImplGL::getRendrer()
{
	throw char ("not implemented exception");
	return NULL;
}
